<html>
  <head>
    <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
    <script src="/js/form_funcs.js" type="text/javascript" charset="utf-8"></script>
    <title>{{ challenge_name }}</title>
  </head>
  <body><table><tr><td>
    <div id="greeting">
      {% block greeting %}
        <h4>Welcome to the {{ challenge_name }} challenge!</h4>
      {% endblock %}
    </div>
    <div id="info">
      {% block info %}
      {% endblock %}
    </div>
    
	<div id="cards">
      {% block cards %}
      {% endblock %}
    </div>
    <div id="form">
      {% block form %}
      {% endblock %}
    </div>
    </td><td align="center">
    <div id="result">
      {% block result %}
        {% if prev_hand %}
		  <h4>Last hand was:</h4>
		  {% if game.i_deal %}
		    <div class=img_table_1>
          {% else %}
			<div class=img_table_2>
		  {% endif %}
			<table height="450" width="600">
			  <tr align="center"><td align="center">
			    {% for my_image in prev_hand.my_images %}
				  <img src="{{ my_image }}" />
				{% endfor %}
			  </td></tr>
			  <tr align="center"><td align="center">
			    {% for table_image in prev_hand.table_images %}
			      <img src="{{ table_image }}" />
			    {% endfor %}
			  </td></tr>
			  <tr align="center"><td align="center">
			    {% for your_image in prev_hand.your_images %}
			      <img src="{{ your_image }}" />
			    {% endfor %}
			  </td></tr>
			</table>
		  </div>
		  <h4>Result: {{ prev_hand.result_message }}</h4>
		  <h6>{{ prev_hand.debug }}</h6>
		  {% endif %}
	  {% endblock result %}
	</div>
	</td></tr></table>
    <div id="links">
      {% for link in links %}
        <a href="{{ link.0 }}">{{ link.1 }}</a>
        {% if forloop.last %}
          <br />
        {% else %}
          |
        {% endif %}
      {% endfor %}
    </div>
  <h6> This is the {{ application_name }} application!</h6>
  </body>
</html>